// clang++ -std=c++11 -stdlib=libc++ main.cpp

//#include <vector>
//#include <string>
//#include <iostream>

// 

struct my_class
{
	int value_ = 15;
};


int f()
{
	return 13;
}

auto g() -> int
{
	return 14;
}


template <int i = 314>
auto h() -> decltype(i)
{
	return i;
}


template <typename T, typename U>
struct tem_class 
{
	static const decltype(T() + U()) value = T() + U();
};


//Solving the SFINAE problem for expressions


template <typename T>
using tem_class4 = tem_class<T, int>;


int main()
{

	// No funca todavia en Clang aunque el reporte dice que si deberia funcionar.
	//	std::vector<int> vec_int = {1, 2, 3, 5, 8, 13};
	
	// error: non-aggregate type 'std::vector<int>' cannot be initialized with an initializer list

	
	auto x = f();		//OK
	//auto i=1, c='c', d=123.23;   //Error: OK

	auto y = g();
	
	
	//auto l = []{ std::cout << "hello, world!" << std::endl; };
	//l();
	
	
	//std::cout << h() << std::endl;
	
	
	
	
	//std::cout << tem_class<int, int>::value << std::endl;
	
	typedef tem_class<int, int> tem_class2;					// SI PERMITIDO DENTRO DEL MAIN
	//std::cout << tem_class2::value << std::endl;

	
	using tem_class3 = tem_class<int, int>;					// SI PERMITIDO DENTRO DEL MAIN
	//std::cout << tem_class3::value << std::endl;
	
	//template <typename T> using tem_class4 = tem_class<T, int>; // NO PERMITIDO DENTRO DEL MAIN
	//std::cout << tem_class4<int>::value << std::endl;
	
	
	int* i = nullptr;
	
	
	return 0;
}
